package eventStrategies;

import java.util.HashMap;

import view.EViewList;
import view.AbstractView;
import view.IView;

import controller.IController;
import model.AbstractModel;
import model.PhysicalDataModel;
import eventManager.AppEvent;
import events.ECodeEventList;
import events.stateMachine.strategyState.DefaultViewEvent;

public class DefaultViewStrategy extends IEventResponse {

	private HashMap<EViewList, AbstractView> views;
	
	public DefaultViewStrategy(HashMap<EViewList, AbstractView> views) {
		super(ECodeEventList.DEFAULT_VIEW);		
		this.views = views;
	}

	@Override
	public void execute(AppEvent event) {
		DefaultViewEvent fullEvent = (DefaultViewEvent) event;
		//PhysicalModel baseModel = (PhysicalModel) model;
		
		//views.get(EViewList.DEFAULT).initView(); //MVCMaker takes of of initialization
		
		if (views.containsKey(EViewList.DEFAULT)) {
			//fullEvent.rootNode.attachChild(views.get(EViewList.DEFAULT).getGeometry());			
			fullEvent.rootNode.attachChild(views.get(EViewList.DEFAULT).getSpatial());
		}		
	}

}
